package com.xiaomaoaixue.system.api;

import com.xiaomaoaixue.common.core.constant.ServiceNameConstants;
import com.xiaomaoaixue.common.core.domain.R;
import com.xiaomaoaixue.common.core.web.domain.AjaxResult;
import com.xiaomaoaixue.system.api.domain.SysDept;
import com.xiaomaoaixue.system.api.domain.SysUser;
import com.xiaomaoaixue.system.api.factory.RemoteUserFallbackFactory;
import com.xiaomaoaixue.system.api.model.LoginUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 用户服务
 * 
 * @author xiaomaoaixue
 */
@FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteDeptService
{
    /**
     * 同步部门
     * @param userList
     * @return
     */
    @PostMapping("/dept/sync")
    public AjaxResult syncSysDept(@RequestBody List<SysDept> deptList);

    @PostMapping("/dept/weCallBackSysDept")
    public AjaxResult weCallBackSysDept(@RequestBody SysDept dept, @RequestParam("type") String type);

}
